home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / tone.arc / FREQ.ASM < prev    next >
Encoding:
Assembly Source File  |  1985-11-26  |  640 b   |  18 lines

  1. ; ROUTINE TO CONVERT FROM FREQUENCY TO PERIOD
  2. ;
  3. freq    proc    far
  4. ;
  5.         push    dx              ; save registers
  6.         push    ax
  7. ;
  8.         mov     dx,12h          ; upper part of numerator
  9.         mov     ax,34DEh        ; lower part of numerator
  10.         div     cx              ; divide by frequency
  11.         mov     cx,ax           ; the quotient is the output
  12. ;
  13.         pop     ax              ; restore registers
  14.         pop     dx
  15.         ret
  16. ;
  17. freq    endp
  18.